home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / mcomm551.zip / TXZM.DOC < prev    next >
Text File  |  1991-12-14  |  25KB  |  480 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                             TXZM -- ZMODEM PROTOCOL DRIVER
  7.  
  8.                  (c) 1991 Mike Dumdei, 6 Holly Lane, Texarkana Texas
  9.                          North East Texas DataLink  1:19/128
  10.                         BBS (903)838-6713, Voice (903)838-8307
  11.  
  12.               TXZM (Texas Zmodem :) is a zmodem protocol that was developed
  13.           to demonstrate the speed and capabilities of the MCOMM C serial
  14.           communications library.  The latest version of TXZM or MCOMM may
  15.           be obtained from N.E.T. DataLink by either logging in and
  16.           downloading or by file request of "MCOMM" or "TXZM".  The
  17.           shareware version of MCOMM contains the TXZM shell in source form
  18.           and the low level Zmodem driver in library form.  The complete
  19.           source code comes with the "Libs & Source" registered version of
  20.           MCOMM.  Libraries for all memory models except for the BCC/TC
  21.           huge model come with the "Libs Only" registered version of MCOMM. 
  22.           See the MCOMM order form for specifics on various options.  
  23.  
  24.                                   TXZM RESTRICTIONS
  25.  
  26.               TXZM IS NOT PUBLIC DOMAIN however the executable version may
  27.           be distributed and used free of charge for non-commercial
  28.           purposes.  If you intend to use TXZM commercially or in a
  29.           commercial environment and the program will be loaded or operated
  30.           on more than 3 systems ANYWHERE within the organization, you must
  31.           obtain a license.  
  32.  
  33.               The complete TXZM source code is provided as part of the
  34.           "Libs & Source" registered version of the MCOMM software package. 
  35.           Linkable libraries are provided with the "Libs Only" registered
  36.           version of MCOMM.  None of the source code or libraries that are
  37.           part of the registered version of MCOMM may be distributed,
  38.           neither may they be incorporated in whole or in part into a
  39.           competing software product without a written license agreement. 
  40.           Competing software products are products that are not end user
  41.           programs themselves, such as "Your Serial Library", and products
  42.           that directly compete with TXZM (fully developed terminal
  43.           programs, BBS systems, and similar products are FUNCTIONALLY
  44.           DIFFERENT than TXZM and NOT considered competing products).  
  45.  
  46.               The license agreement requirement for commercial use of the
  47.           EXECUTABLE VERSION ONLY (TXZM.EXE) does not apply to
  48.           governmental, educational, church, civic, or non-profit
  49.           organizations.  This does not waive restrictions that apply to
  50.           the source code for those organizations.
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.                          MCOMM ASYNC LIBRARY (Advertisement)
  58.  
  59.               MCOMM  is a  serial communications  library for  Microsoft C,
  60.           Turbo C/C++, Borland C/C++, and Zortech C/C++.  It also will work
  61.           with any other C  compiler or language that supports  Microsoft C
  62.           calling conventions.  Some of the features of MCOMM are:
  63.  
  64.                -  Fully interrupt driven
  65.                -  16550 FIFO mode support
  66.                -  Baud rates up to 115200 baud
  67.                -  Supports definitions  for any comm port  that operates on
  68.                   IRQs 2 through 7 at any address
  69.                -  Supports simultaneous operation of 2 ports
  70.                -  Written in  assembler for maximum speed  and minimum code
  71.                   size
  72.                -  Advanced  features such  as  block transmit  and receive,
  73.                   XON/XOFF and  hardware flow control, receive  buffer look
  74.                   ahead, definable ring buffer sizes and location, ...
  75.  
  76.               Also  included  with MCOMM  is a  set  of ANSI  capable video
  77.           functions  that  support  windowed  output,  save/restore  screen
  78.           functions, timer  functions, and  miscellaneous other code.   The
  79.           current shareware version of MCOMM is MCOMM551.ZIP.   It includes
  80.           a  complete small model LIB, TXZM (partial source, rest as libs),
  81.           and  both a  C and  C++ demo  terminal program.    The registered
  82.           version  is available as either  "Libs only" or  "Libs & Source".
  83.           The "Libs Only"  version is  $25 and includes  libraries for  all
  84.           memory models.  The "Libs & Source" version is $45 and comes with
  85.           both libraries and all source code.  See the MCOMM order form.
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.                                     TXZM OPERATION
  93.  
  94.               TXZM has 3 modes  of operation.  These are command line send,
  95.           command  line receive, and terminal  mode.  Running  TXZM with no
  96.           command line parameters will list available TXZM options.
  97.  
  98.           Specifying the serial port:
  99.  
  100.               TXZM directly  supports COM1  through COM4, however  COM3 and
  101.           COM4   on  older  hardware  may  not  match  what  is  considered
  102.           standard.  The -c switch (described  below) may be  used for non-
  103.           standard  configurations of  COM3 and  COM4 or  to force  TXZM to
  104.           recognize  a custom port.   For standard versions  of COM1-4, use
  105.           "txzm com#" where '#' is 1-4.
  106.  
  107.           TXZM switches:
  108.  
  109.               -u  Start  in terminal mode.   Terminal  mode may  be started
  110.                   either before  or after  a CONNECT  is made.    It has  a
  111.                   limited set of functions (dial, upload, download).
  112.  
  113.               -r  Start in receive mode.  This switch must come last on the
  114.                   command line  if it is  used.  It  may be followed  by an
  115.                   optional subdirectory if the files are to downloaded to a
  116.                   specific  location.    The  -r  switch  may  be  used  in
  117.                   conjunction  with the  -u  switch to  specify a  download
  118.                   directory.   When used with the -u switch, TXZM starts in
  119.                   mini-terminal mode.
  120.  
  121.               -s  Start up in send mode.   This must be the last  switch on
  122.                   the command line and be followed by the filename(s) to be
  123.                   sent. The filename list may contain wild cards.  The send
  124.                   function  will  recurs  subdirectories  if  the  filename
  125.                   specifications   are  placed  in  parenthesis.    Placing
  126.                   filenames  in parenthesis  to recurs  subdirectories also
  127.                   works in mini-terminal mode.
  128.  
  129.               -p  Send or accept complete pathnames.  This option, used in 
  130.                   conjunction with the -r option, will cause TXZM to accept
  131.                   complete pathname information  in the received  filename.
  132.                   Without  it, only  the  root name  and  extension of  the
  133.                   filename  are used.  If the received filename specifies a
  134.                   directory that does not exist, it will  be created.  If a
  135.                   download  directory   was  specified  (-r   dlpath),  the
  136.                   subdirectories will be created under "dlpath".
  137.  
  138.                   When  used with the -s  switch, the -p  switch will cause
  139.                   filenames to be sent with complete path information.  Per
  140.                   zmodem specifications,  only the  path is sent  (no drive
  141.                   identifiers).  Without the -p switch only the file's root
  142.                   name  and  extension are  sent.    This  applies even  if
  143.                   recursing subdirectories.
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.               -b####  Specify the CONNECT baud rate.  The CONNECT baud rate
  151.                   is used to determine estimated file transfer times.  TXZM
  152.                   currently  will  not  adjust   to  a  CONNECT  rate  when
  153.                   initially making  the connection.   Unless a  locked baud
  154.                   rate is used (-l), you must dial using  the baud rate you
  155.                   will  CONNECT   at.     If  the  connection   is  already
  156.                   established, and  neither -l  or -b  is given, TXZM  will
  157.                   open  the  port  using  the baud  rate  it  is  currently
  158.                   operating at.
  159.  
  160.               -l####  Set a  locked baud rate.   Use this  option to set  a
  161.                   fixed computer to modem  baud rate. The -b option  may be
  162.                   used with the -l  option to specify both the  computer to
  163.                   modem rate and the modem to line rate.
  164.  
  165.               -chhh,#   Specify  a non-standard  port configuration.   TXZM
  166.                   will  work with any port addresfrom 000h to 3f8h and IRQs
  167.                   2-7.   Replace  'hhh' with  the port  address in  hex and
  168.                   '#'ith the IRQ to be used.  For example, to use a port at
  169.                   I/O  address 2E8h that uses IRQ 5, use "txzm -c2E8,5".
  170.  
  171.               -h  Use hardware  flow control  (RTS/CTS).  This  is required
  172.                   for modems that use a locked baud rate.
  173.  
  174.               -i  Ignore absence of carrier detect signal.  Use this switch
  175.                   when  using  TXZM  to  transfer   files  between  systems
  176.                   connected   with a null modem cable.  (TXZM only requires
  177.                   the Rx, Tx, and Gnd wires to be connected).
  178.  
  179.               -v  Disable serial I/O  during disk writes.   Use this option
  180.                   if  errors  occur when  the received data  is written  to
  181.                   disk.   This should only  be necessary when  operating at
  182.                   high  baud rates with no 16550  UART or the file is being
  183.                   downloaded to a floppy.   The -v option also  expands the
  184.                   disk  buffer to 20K bytes  to maintain a  higher level of
  185.                   efficiency.
  186.  
  187.  
  188.               -e# Set  duplicate  file   handling  option.     This  option
  189.                   determines what happens if an attempt is made to download
  190.                   a file  that already exists.   The following  choices are
  191.                   available:
  192.                     -e0  Skip the file -- do not download.
  193.                     -e1  Resume the transfer at the end of current file.   
  194.                          This is the default.
  195.                     -e2  Create a duplicate file name and download the file
  196.                          as a separate file.
  197.                     -e3  Overwrite the existing file.
  198.  
  199.               -w####  Sets the maximum bytes  that may be in transit at any
  200.                   one time (transmit window size).  This must be a multiple
  201.                   of 128.
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.               -x  Escape all  control characters.   This option  causes the
  209.                   characters between 00h and  20h, 80h and A0h, 7Fh,  & FFh
  210.                   to  be  ZDLE escaped.  Zmodem  automatically escapes XON,
  211.                   XOFF, ZDLE (CAN), DLE, and "<CR>@<CR>" sequences.  The -x
  212.                   option   is for networks  that do not  pass other control
  213.                   characters. 
  214.  
  215.               -x# As an  option, a specific  list of control  characters to
  216.                   escape may be given.  For example to only ZDLE escape the
  217.                   ESC character (27 decimal or 1B hex) and ESC+parity  (145
  218.                   decimal or 9B hex)  and let all other control  characters
  219.                   pass unaltered, use:  -x27,145.  
  220.  
  221.               -6  Force use of 16 bit CRC.  The default is 32 bit CRC. This
  222.                   option does  not show up on  the help screen (ran  out of
  223.                   room).
  224.  
  225.               -0  Use  BIOS screen writes.  This only works in command line
  226.                   mode.  Mini-terminal still does direct writes.
  227.  
  228.               -q  Run in  DesqView mode.   This option makes  TXZM DesqView
  229.                   aware meaning it writes to DesqView's video buffer rather
  230.                   straight  into video  memory.   It  also  causes TXZM  to
  231.                   release its time slice when it is idle.
  232.  
  233.           16550 related switches:
  234.  
  235.               -d  Do   not  enable   16550  FIFO   mode.     Normally  TXZM
  236.                   automatically enables  FIFO mode.   If  you  are using  a
  237.                   Western Digital  16550 UART at  lower baud rates  you may
  238.                   need  to use this option.  The WDC16550 UART doesn't work
  239.                   in FIFO mode  at low baud rates.  If you have a 16550 and
  240.                   don't know if  it is  a Western Digital  but get  Garbled
  241.                   Packet errors  when attempting  to start a  transfer, try
  242.                   this option.  The National Semiconductor 16550 (NS16550A)
  243.                   works at all baud rates in FIFO mode.
  244.  
  245.               -t# Maximum characters to send  to 16550 FIFOs per interrupt.
  246.                   This may be between 1 and 16.  The default is 8.  A lower
  247.                   value  may be required for modems that used a locked baud
  248.                   rate, hardware  flow control,  and have a  small internal
  249.                   buffer.  8 works fine with USRs.
  250.  
  251.               -m  Disable modem status register interrupts.  This option is
  252.                   another patch to accommodate Western Digital's version of
  253.                   the  16550.  Some WDC16550s  lock up if  the modem status
  254.                   lines (CTS,  CD, etc.)  are not  connected  to a  driving
  255.                   signal.   This could happen  if the serial  or null modem
  256.                   cable being used does not have all signal lines connected
  257.                   (very possible  with  a  null  modem cable).    Using  -m
  258.                   prevents this  problem.   It also disables  hardware flow
  259.                   control and  carrier detect,  however, so if  you require
  260.                   either of these and have a  WDC16550 you must use a cable
  261.                   with all appropriate lines connected.
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.         Examples:
  269.  
  270.             txzm -p -s (c:\)   // send all files on drive C -- include
  271.                                // complete path information
  272.  
  273.             txzm -p -r         // accept complete pathnames -- if path
  274.                                // does not exist, create it
  275.  
  276.             txzm -p -r d:\temp // accept complete pathnames but put files
  277.                                // and created directories under D:\TEMP
  278.  
  279.             txzm -r            // receive to current directory, if path
  280.                                // information is received it is ignored
  281.  
  282.             txzm -s (\project\*.c) (\project\*.h)  // Sends all .c and .h
  283.                                // files in the subdir PROJECT and all subs
  284.                                // under project.  Does not send pathnames.
  285.  
  286.             txzm -u -r \dnlds  // start in mini-terminal mode, received
  287.                                // files are placed in "\dnlds" directory
  288.  
  289.             txzm com2 -u       // mini-terminal mode, use COM2
  290.  
  291.             txzm -l38400 -b9600 -h -s file1.zip file2.zip
  292.                                // 38400 baud locked rate, 9600 CONNECT,
  293.                                // hardware handshake, send file list
  294.  
  295.             txzm -b2400 -u     // 2400 baud, mini-terminal mode
  296.  
  297.             txzm -c2e0,7 -r    // custom serial port at 2E0h on IRQ7,
  298.                                // use current baud rate, receive
  299.  
  300.             txzm com2 -b115200 i u  // 115200 baud, ignore carrier detect,
  301.                                // mini-terminal mode
  302.  
  303.             txzm -e2 -r        // COM1, current baud rate, receive, create
  304.                                // duplicate name if file exists
  305.  
  306.             txzm -s @filelist  // send all files listed in "filelist"
  307.                                // the name "filelist" is an example only
  308.  
  309.  
  310.             Other than  the -r and -s  switches that must appear  last on the
  311.         command  line if used, neither case nor switch order are significant.
  312.         Also you may  use a '/' instead  of a '-' or no  switch identifier at
  313.         all.  Ex: "txzm i E2 -u /b2400 r" is legal syntax.
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.                                     GENERAL NOTES
  321.  
  322.             TXZM  is faster than any other zmodem  protocol driver I am aware
  323.         of.  It will run at 95% efficiency in both send  and receive modes at
  324.         115200 baud on an 8 MHz 286 with a 16550 UART.  This translates to an
  325.         effective throughput  of 110 Kbps.  In a PC Magazine (Apr 91) article
  326.         reviewing  various communications software  packages, the BEST zmodem
  327.         operated at less than 50 Kbps when tested at 115200 baud on the  same
  328.         type of equipment (8 Mhz 286's with 16550 UARTs).  TXZM is over twice
  329.         as  fast.    The review  covered  several  well  known shareware  and
  330.         commercial packages.
  331.  
  332.             TXZM was also tested on a 4.77 MHz 8088 laptop that contained the
  333.         functional equivalent of  a 16450 UART (no FIFOs) and  a 4.77 MHz IBM
  334.         XT  (true blue IBM)  that had 16550  UARTs installed.   On the laptop
  335.         system TXZM could  send most  efficiently at 23040  baud and  receive
  336.         most  efficiently at  28800 baud.   The XT,  with 16550  UARTs, could
  337.         receive  at a  full 38400 baud  but with  the baud rate  set to 38400
  338.         could only achieve an effective throughput rate of around 35000 baud.
  339.         The  tests were  performed using  the systems' hard  drives (original
  340.         slow hard  drives), not a  RAM disk,  which also had  some impact  on
  341.         speed.   With 16550 UART's,  TXZM could very effectively  work a high
  342.         speed modem (HST, V.32, or V.32bis) even on a slow 4.77 MHz computer.
  343.  
  344.             If you compare the  CPS rating stated by TXZM and other programs,
  345.         you may  find TXZM reporting slightly lower rates.   This is due to a
  346.         difference  in the  calculation method  TXZM uses  only.   Many other
  347.         progams  appear to fudge a little bit  on their statistics.  At lower
  348.         speeds or  on fast CPUs all  Zmodem drivers will run  about the same.
  349.         The speed difference shows up when the system is under a load such as
  350.         with extremely high baud rates or  moderately high baud rates on slow
  351.         CPUs.
  352.  
  353.  
  354.                                      BBS SUPPORT
  355.  
  356.             TXZM  now recognizes  the TXZMLOG  environment variable  and will
  357.         create a log file  with the same format as the one  created by DSZ if
  358.         DSZLOG is set.  This was added primarily to support BBS software that
  359.         uses DSZLOG format log files to track downloads, efficiency, etc.  If
  360.         all you  want is a  log file you  can set TXZMLOG  only.  If  you are
  361.         using BBS software that looks for a DSZLOG variable, you will have to
  362.         also set DSZLOG to the same value as TXZMLOG.  Ex:
  363.  
  364.               set TXZMLOG=C:\BBS\ZMODEM.LOG
  365.               set DSZLOG=C:\BBS\ZMODEM.LOG
  366.  
  367.             I did not use DSZLOG to avoid infringing on any non-public domain
  368.         features of DSZ.  If you want to patch  your personal copy of TXZM to
  369.         use DSZLOG  directly rather than TXZMLOG, you  can use a utility such
  370.         as Norton  Utilities or  PC Tools  to  scan TXZM.EXE  for the  string
  371.         "TXZMLOG" and  change it  to "DSZLOG".  This is  only  patch you  are
  372.         authorized to  make. DO  NOT under  ANY circumstances  distribute ANY
  373.         modified version.
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.             It is also now possible to specify a file that contains a list of
  381.         the files to  be sent.  This is  also primarily for BBS support.   To
  382.         use this option precede the file containing the list of files with an
  383.         '@'  sign.   The  files  may be  separated  by  any valid  whitespace
  384.         characters including spaces, tabs, carriage returns, line feeds, etc.
  385.  
  386.             The -q option has been added as of version 2.10 for BBS operators
  387.         who run under DesqView.  It causes TXZM to not mess up the  video and
  388.         also to release CPU time when it is waiting for characters or for the
  389.         transmit buffer to empty.  
  390.  
  391.             The -0 option will disable direct screen writes if you are  using
  392.         command line send or command line receive options.  All screen writes
  393.         will  be done  through BIOS  calls.   Mini-terminal mode  does direct
  394.         writes even with the -0 option specified.  -0  does not appear on the
  395.         help screen.
  396.  
  397.             BBS sysops  may also use TXZM free (even if you charge for access
  398.         to your system).
  399.  
  400.                                    REVISION HISTORY
  401.  
  402.           2.14  Minor  changes so  code will  compile without  warnings using
  403.                 BC++ 3.0  and  so that  TXZM  would automatically  trigger  a
  404.                 Qmodem download  (Qmodem requires  an "rz\r"  as well as  the
  405.                 INIT  packet -- most programs trip on the INIT packet alone).
  406.                 Also modified the -n (BBS support option) so that it took the
  407.                 name of a Maximus or Opus style LASTUSER.BBS filename  rather
  408.                 than a  node number.   Modified FIFO usage  so that TXZM  set
  409.                 FIFO buffers to 1 in terminal  mode and 8 when sending  files
  410.                 (corrects jerky display at low baud rates).
  411.  
  412.           2.10  Changed  name  to TXZM  from  ZMP.    The ZMPLOG  envrionment
  413.                 variable is now  TXZMLOG. Found out somebody else already had
  414.                 a ZMP in CP/M days.  Added DesqView aware option.  Fixed Dial
  415.                 Command  so that  it  looked at  the  connect baud  rate  and
  416.                 adjusted accordingly.   Fixed Redial  Command to  continually
  417.                 dial until a  connect was made or ESC pressed.   Added F1 for
  418.                 help  key.   Added  ALT-P so  the  modem parameters  could be
  419.                 changed manually, ALT-C so  the screen could be  cleared, and
  420.                 ALT-= for Doorway mode operation.
  421.  
  422.           2.00  First non-beta version.  Added a capture file.  Fixed a minor
  423.                 problem with the -0 option.
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.           1.21  Added support for  specifying files  to send in  a file  that
  432.                 contains a list of  the filenames.  Added -0  option (disable
  433.                 direct screen writes in command mode).
  434.  
  435.           1.20  Fixed  bug introduced in version 1.19 that caused a divide by
  436.                 zero error  if the total bytes  to be sent was  between 1 and
  437.                 18.  Added ZMPLOG environment variable.
  438.  
  439.           1.19  Corrected bugs in the -w and -x  options.  Fixed problem with
  440.                 negative  CPS rates  showing up  when more than  11 megabytes
  441.                 were sent.  Added the -6 switch.
  442.  
  443.           1.17  Fixed double backslash in pathnames when downloading while in
  444.                 the root directory (couldn't DL to root).
  445.  
  446.           1.16  Added support for send and  receive of complete pathnames and
  447.                 creation of  subdirectories.    This  allows  duplication  of
  448.                 entire drives or subdirectories through the serial port.
  449.  
  450.           1.10  16 bit CRC mode  now really does work.  TXZM102  was supposed
  451.                 to have fixed it but didn't.
  452.  
  453.           1.02  Fixed bug  in 16 bit CRC mode (I thought).  Fixed minor error
  454.                 in ZRPOS handler. The sender now sends a ZCRCW packet when an
  455.                 error occurs  rather than a  ZCRCG. This conforms  with Chuck
  456.                 Forsberg's Zmodem specification.
  457.  
  458.           1.01  Fixed  bug in  ZRPOS handler.   This bug  occasionally caused
  459.                 TXZM  to  trash the  screen  and  lock up  when  a ZRPOS  was
  460.                 received.
  461.  
  462.                 Optimized the code.  TXZM will now operate at  115200 baud at
  463.                 95% efficiency on an 8MHz 286 (approx 11100 cps -- 2 meg in 3
  464.                 mins).  A  16550  UART  is  required  to  obtain  high  speed
  465.                 operation.
  466.  
  467.                 In mini-term mode, PGDN not puts TXZM in receive mode in case
  468.                 the sender's ZRQINIT was missed.  Previously it relied on the
  469.                 incoming  ZRQINIT  to trigger  receive  mode.   It  now works
  470.                 either way.
  471.  
  472.                 Added a '-v'  switch.  This  switch disables overlaying  disk
  473.                 and  serial I/O.  It also  expands the receive file buffer to
  474.                 20K bytes.  The result is 20K of data is received, serial I/O
  475.                 pauses,  the 20K is written to disk,  a ZACK is sent, and the
  476.                 sender resumes sending.
  477.  
  478.           1.00  Original version.
  479.  
  480.